<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

    <title>Password Management Links Fragment</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
</head>

<body>
    <div th:fragment="pmlinks" id="pmlinks" class="my-2">
        <form th:if="${passwordManagementEnabled}" method="post" id="passwordManagementForm">
            <input type="hidden" name="execution" th:value="${flowExecutionKey}" />
            <input type="hidden" name="_eventId" value="resetPassword" />
            <span class="fa fa-unlock"></span>
            <a th:utext="#{screen.pm.button.resetPassword}" href="javascript:void(0)"
                onclick="document.getElementById('passwordManagementForm').submit();" />
            <p />
        </form>

        <form th:if="${passwordManagementEnabled}" method="post" id="passwordManagementUserForm">
            <input type="hidden" name="execution" th:value="${flowExecutionKey}" />
            <input type="hidden" name="_eventId" value="forgotUsername" />
            <span class="fa fa-unlock"></span>
            <a th:utext="#{screen.pm.button.forgotUsername}" href="javascript:void(0)"
                onclick="document.getElementById('passwordManagementUserForm').submit();" />
            <p />
        </form>

        <div th:unless="${passwordManagementEnabled}">
            <br />
            <span class="fa fa-question-circle"></span>
            <span th:utext="#{screen.pm.button.forgotpwd('https://pwd.example.org')}">Forgot your password?</span>
            <p />
        </div>
    </div>
</body>

</html>